
// axios
import request from './http/request';

export function login(data) {
	return request({
		url: '/common/login',
		method: 'post',
		data,
		hideloading: false
	});
}
export function getPublicKey(data) {
	return request({
		url: '/common/getPublicKey',
		method: 'post',
		data,
		hideloading: false
	});
}
export function getLoginInfo(data) {
	return request({
		url: '/common/getLoginInfo',
		method: 'post',
		data,
		hideloading: false
	});
}
export function upload(data) {
	return request({
		url: '/common/upload',
		method: 'post',
		data,
		hideloading: false
	});
}
export function logout(data) {
	return request({
		url: '/common/logout',
		method: 'post',
		data,
		hideloading: false
	});
}
export function getRoles() {
	return request({
		url: '/role/all',
		method: 'post',
		hideloading: true
	});
}

export function register(data) {
	return request({
		url: '/common/register',
		method: 'post',
		data,
		hideloading: false
	});
}

// 调用 alipay 支付
export function alipayTradePrecreate(data) {
	return request({
		url: '/common/alipayTradePrecreate',
		method: 'post',
		data,
		hideloading: false
	});
}

export function alipayTradeWapPay(data) {
	return request({
		url: '/common/alipayTradeWapPay',
		method: 'post',
		data,
		hideloading: false
	});
}

export function alipayTradeQuery(data) {
	return request({
		url: '/common/alipayTradeQuery',
		method: 'post',
		data,
		hideloading: false
	});
}
